let arr: string[] = ['北京', '上海', '广州', '深圳']


arr.forEach((item, index, arr) => {
  console.log(item)
  console.log(index)
  console.log(arr)
  
}) 

let numArr: number[] = [1,2,3,4,5,6,22,11,10,0]

//foreach 判断是否含有大于22的数字
numArr.forEach(item => {
  if(item > 21) {
    console.log('有')
  }
  console.log(item)
})
console.log(numArr.some(item => {
  if(item > 21) {
    return true
  }
  console.log(item)
}))
